<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" language="java"%>
<%@ page import="westh.ilib.bean.croDomainSearch.Resource" language="java"%>
<%@ page import="westh.ilib.bean.croDomainSearch.Author" language="java"%>
<%@ page import="westh.ilib.util.PageInfo" language="java"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">


<HEAD>
	<base href="${AppURL}/ilib/" />
  	<title>推荐页面</title>
	<LINK rel=stylesheet type=text/css href="style/main.css">
</HEAD>

<jsp:useBean id="pageInfo" scope="request" class="westh.ilib.util.PageInfo" />

<body>
<DIV id="container">
	<DIV id="header">
		<div id="logo">
			<div><img src="images/idlib.jpg"></div>
		</div>
		<ul id="menu">
			<li><a href="../index.html">首页</a></li>
			<li><a href="../addFunction.html">添加功能块</a><img src="images/add2.gif"></li>		
			<li><a href="../myResource.html">我的资源</a></li>
			<li><a href="../option.html">设置</a></li>
			<li><a href="../logoff.html">退出</a></li>
		</ul>
	</DIv>

	<div id="option">
		你好，wangziqi!		
	</div>

	<div class="STYLE1" id="clear">
	<!--	<img src="images/tag_blue.gif" width="16" height="16">
		<a href="../sendOption.html">推荐设置</a> 
		<img src="images/tag_blue.gif" width="16" height="16"> -->
	</div>  

	<div id="lblockpaper">
		<h3 id="tinfo">推荐列表：</h3> 
		<div id="clear"></div>   
		<form name="testForm" action="http://localhost:4180/ilib/getRecommendedResource.do" method="post" onsubmit="return validate_form(this)" >
	    	
	    	<%@ include file="/ilib/JSP/pageTop.jsp"%>

			<ul style="list-style-type:none;">
	      	<%
	      		//PageInfo pageInfo = (PageInfo)request.getAttribute("pageInfo");
	     		List<Resource> list = pageInfo.getPageList();
	     		int iNo=1;
	     		Iterator iterator = list.iterator();
	     		while(iterator.hasNext())
	     		{
	    	  		Resource resource = (Resource)iterator.next();
	    	  		out.println("<li>");
	    	  		out.println((iNo + (pageInfo.getPageNO() -1) * pageInfo.getPageSize()) + ".");	    	  		
	    	  		out.println("<a id=\"paper\" href=\"" + "./getResource.do?resourceId=" + resource.getRscId() + "\">" + resource.getRscTitle() + "</a>");
	    	  		out.println("<br/>");
	    	  		Author firstAuthor = resource.getRscFirstAuthor();
	    	  		out.println("First Author: <a id=\"author\" href=\"#\">" + firstAuthor.getName() + "</a><br/>");
	    	  		out.println("Institution: " + firstAuthor.getInstitution() + "<br/>");
	    	  		out.println("ieeeRefid: " + firstAuthor.getIeeeRefid() + "<br/>");
	    	  		out.println("</li>");
	    	  		iNo++;
	    	  	}
	     	%>
	     	</ul> 
			

			<%@ include file="/ilib/JSP/pageBottom.jsp"%>
		</form> 

	</div>   
	<div id="footer">
		iLib 2010
	</div>	
<!-- end #container -->
</DIV>
</body>
</html>
